package com.office.contract.check.service.impl;

import java.util.List;
import com.office.common.utils.DateUtils;
import com.office.contract.project.domain.ContractInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.office.contract.check.mapper.ProcessInfoMapper;
import com.office.contract.check.service.IProcessInfoService;

import javax.annotation.Resource;

/**
 * 合同审核Service业务层处理
 * 
 * @author 柒月
 * @date 2025-05-23
 */
@Service
public class ProcessInfoServiceImpl implements IProcessInfoService
{
    @Resource
    private ProcessInfoMapper ProcessInfoMapper;

    /**
     * 查询合同审核
     * 
     * @param id 合同审核主键
     * @return 合同审核
     */
    @Override
    public ContractInfo selectContractInfoById(Long id)
    {
        return ProcessInfoMapper.selectContractInfoById(id);
    }

    /**
     * 查询合同审核列表
     * 
     * @param contractInfo 合同审核
     * @return 合同审核
     */
    @Override
    public List<ContractInfo> selectContractInfoList(ContractInfo contractInfo)
    {
        return ProcessInfoMapper.selectContractInfoList(contractInfo);
    }

    /**
     * 新增合同审核
     * 
     * @param contractInfo 合同审核
     * @return 结果
     */
    @Override
    public int insertContractInfo(ContractInfo contractInfo)
    {
        contractInfo.setCreateTime(DateUtils.getNowDate());
        return ProcessInfoMapper.insertContractInfo(contractInfo);
    }

    /**
     * 修改合同审核
     * 
     * @param contractInfo 合同审核
     * @return 结果
     */
    @Override
    public int updateContractInfo(ContractInfo contractInfo)
    {
        contractInfo.setUpdateTime(DateUtils.getNowDate());
        return ProcessInfoMapper.updateContractInfo(contractInfo);
    }

    /**
     * 批量删除合同审核
     * 
     * @param ids 需要删除的合同审核主键
     * @return 结果
     */
    @Override
    public int deleteContractInfoByIds(Long[] ids)
    {
        return ProcessInfoMapper.deleteContractInfoByIds(ids);
    }

    /**
     * 删除合同审核信息
     * 
     * @param id 合同审核主键
     * @return 结果
     */
    @Override
    public int deleteContractInfoById(Long id)
    {
        return ProcessInfoMapper.deleteContractInfoById(id);
    }
}
